The present invention relates to message formatting and, more particularly, to production-rule based processing of an input data stream, such as a character stream, to efficiently provide an output character stream formatted and/or parsed in accordance with a predetermined structure or scheme.
Strategic command authority messages such as Emergency Action Messages (EAMS) must be organized in one of a plurality of specific transmission formats so that message recipients can authenticate and validate the EAM. The particular message format used is driven by the intended transmission mechanism and transmission mode (satellite, VLF/LF, landline, RF links (MF/HF), etc.) and the message data content. In general, certain delimiting characters that mark message boundaries as well as internal data fields are allowed to vary in a number of acceptable occurrences. The vagaries of the message data and the associated rules are readily accommodated by the human mind, but are difficult to embed within a computer program. However, the volume of messages necessitates computer processing to assist human operators in managing the workload.
Previous solutions have tried to program all of the possible combinations and/or permutations that can occur within the data message; the programming challenge can become intractable as the number of allowed message variations grows because of the possible combinations and permutations.